import * as turf from '@turf/turf';
import { Math as CesiumMath } from 'cesium';
export { CesiumMath, turf };

export type Coordinate = {
    x: number;
    y: number;
};

export type Merge<A, B> = Omit<A, keyof B> & B;
export type ValueOf<T> = T[keyof T];

type StringOnly<K> = K extends string ? K : never;

export type ArrayKeys<K> = StringOnly<
    K extends readonly (infer E)[] ? E : K extends (infer E)[] ? E : K
>;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type ConstructorOptions<T extends new (...args: any[]) => any> = NonNullable<
    ConstructorParameters<T>[0]
>;

export type NotNull<T> = T extends undefined | null ? never : T;

export type CartographicCoordinate = {
    longitude: number; // 经度
    latitude: number; // 纬度
    height: number; // 高度
};
